import { InputNumber } from 'antd';
import React, { useState } from 'react';
import { ScFlipCard } from 'sc-components-test';
export default () => {
  const [currentVal, setCurrentVal] = useState(0);
  const [currentNumber, setCurrentNumber] = useState(5);
  return (
    <>
      <span>输入翻牌器的值:</span>
      <InputNumber
        style={{ marginBottom: 20, marginLeft: 10 }}
        value={currentVal}
        controls={false}
        onChange={(v)=>{
            console.log(v)
        }}
        onPressEnter={(e) => {
          setCurrentVal(e.target?.value);
        }}
      ></InputNumber>
      <span style={{ marginLeft: 10 }}>输入翻牌器的位数:</span>
      <InputNumber
        style={{ marginBottom: 20, marginLeft: 10 }}
        value={currentNumber}
        controls={false}
        onPressEnter={(e) => {
          setCurrentNumber(Number(e.target?.value));
        }}
      ></InputNumber>
      <ScFlipCard value={currentVal} numbers={currentNumber}></ScFlipCard>
    </>
  );
};
